package com.py.admin.controller;

import com.py.admin.service.AdUserService;
import com.py.model.admin.dtos.AdUserDto;
import com.py.model.common.dtos.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 管理员用户信息表 前端控制器
 * </p>
 *
 * @author itheima
 */
@Slf4j
@RestController
@RequestMapping("/login")
public class AdUserController {

    @Autowired
    private AdUserService adUserService;

    /**
     * 登录
     * @return
     */
    @PostMapping("/in")
    public ResponseResult login(@RequestBody AdUserDto adUserDto) {


        return adUserService.login(adUserDto);


    }



}
